<?php

namespace App\Http\Controllers;

use App\Http\Model\User;
use Illuminate\Http\Request;

use App\Http\Requests;
use Illuminate\Support\Facades\DB;

class UserController extends Controller
{
    //
    public function index(){
//        $pdo = DB::connection()->getPdo();
//        dd($pdo);
//       $users = DB::table('user')->where("user_id",'>',1)->get();
//       dump($users);
//       foreach ($users as $v){
//           echo "username:{$v->user_name},password:{$v->user_pass}<br/>";
//       }


        $user = User::find(1);
        $user->user_name = 'wangwu';
        $user->user_pass = 'wangwu';
        $user->save();
        dd($user);

    }
}
